package educationTool.model;

import java.util.LinkedList;
import java.util.List;

public class User implements Comparable<User>{
	
	private String login;
	private String password;
        @Override
	public int compareTo(User user)
        {
            if(login.compareTo(user.login)<0) {
                return -1;
            }
            else
                if(login.compareTo(user.login)==0) {
                return 0;
            }
            else {
                return 1;
            }
                
                
        }
        /**
         * Returns user login
         * @return 
         */
        @Override
        public String toString()
        {
            return login+"\n"+password+"\n";
        }

  

    
   
    private List<Pair> lessonList;

    public User(String login, String password) {
        this.login = login;
        this.password = password;
    }

    public String getLogin() {
        return login;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public List<Pair> getLessonList() {
        return lessonList;
    }

    public void setLessonList(LinkedList<Pair> lessonList) {
        this.lessonList = lessonList;
    }

}
